<script>
export default {
  data() {
    return {
      notice_id:null,
      article:{},
    };
  },
  methods:{
    //进行传值数据处理
    Parameter(){
      if(this.$route.params.noticeId!=null){
        this.notice_id=this.$route.params.noticeId;
      }
      return this.notice_id;
    },
    LoadArticle(){
      this.$http.get("http://localhost:8080/notice/showDetails",{
        params:{
         notice_id:this.Parameter()
        }
      }).then((res)=>{
        this.article= res.data;
        console.log(this.article);
      }).catch(function (err) {
        console.log(err);
      })
    },
  },
  mounted() {
    this.LoadArticle()
  }
};
</script>

<template>
  <div class="notice-container" >
    <h3 class="notice-theme" >{{ article.notice_theme }}</h3>
    <p class="notice-content" >{{ article.notice_content }}</p>
  </div>
</template>

<style scoped>
.notice-container {
  max-width: 60%;
  margin:auto;
  padding: 20px;
  border: 1px solid #ddd;
  border-radius: 5px;
  background-color: #fffb00 /* 添加背景色 */
}

.notice-theme {
  display: flex;
  justify-content: center;
  color: #333; /* 标题颜色 */
  font-size: 30px;
  margin-bottom: 10px;
}

.notice-content {
  font-size: 20px;
  color: #151515; /* 内容颜色 */
  line-height: 1.6;
}

</style>